package net
{
	public class SocketOut
	{
		private var _socket:ByteSocket;
		public function SocketOut(socket:ByteSocket)
		{
			_socket = socket;
		}
		
		public function login(username:String,pwd:String):void
		{
			var pkg:PackageOut = new PackageOut(DLOutProtocolNumber.LOGIN);
			pkg.writeUTF(username);
			pkg.writeUTF(pwd);
			_socket.send(pkg);
		}
		
		public function sendChat(message:String):void
		{
			var pkg:PackageOut = new PackageOut(DLOutProtocolNumber.CHAT);
			pkg.writeUTF(message);
			_socket.send(pkg);
		}
	}
}